home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1996 June / EnigmA AMIGA RUN 08 (1996)(G.R. Edizioni)(IT)[!][issue 1996-06][EARSAN CD VII].iso / earcd / comm1 / cnetwho.lha / who / Normal < prev    next >
Text File  |  1996-05-08  |  5KB  |  59 lines

  1. /**************************************************************************\
  2.             $VER: CNet Normal WHO, v2.61 (8-May-96) by Dotoran!
  3. \**************************************************************************/
  4. options results;signal on SYNTAX;signal on ERROR;signal on IOERR
  5. tr=transmit;se=sendstring;gu=getuser;gs=getscratch;mg=maygetchar;gu 1311992;dp=result
  6. a='rexxsupport.library';if ~show('l',a) then if ~addlib(a,0,-30) then exit
  7. changewhere 'Normal WHO';low=0;gu 2225094;high=result;gu 23;myport=result;pd=2424286;gu 55;help=result
  8. gu 2107337;idle=result;gu 1100661;conf=BitTST(d2c(result,4),7);call CONFIG;gu 1302307;arg=upper(result)
  9. if arg=''|arg='C' then args=low'-'high;if arg>''&arg~='?'&left(arg,1)~='C' then call ARGS
  10. tot=high;call PARSER(args,0,high);helpT='n1cfNormal Whoc6, vcb2c6.cb60 c6by cdDotorann2'
  11. helpT=helpT'c7Formatce:  caWH c7[c6portce# c6pce#cb-c6pce# c6pce#cb,c6pce# cb-c6pce# c6pce#cb-c7]'
  12. if totpit=0 then arg='?';if arg='?' then do;tr helpT;exit;end;if left(arg,1)='C'&conf=1 then do
  13. se 'n1c3Loading z4c7NORMALz0 c3who config...';tr '#0'dp'Config}';exit;end
  14.  
  15. v1=1;v2=1;v4=0;v5=0;v6=0;loS=0;hiS=0;v7=1;if v7=1 then tr 'f1'
  16.  
  17. if getclip('IdleWhoB0')='' then sendstring '#0'dp'Loader}'
  18. tr "z6c4Portz0 z6c4User Handle         z0 z6c4Logon z0 z6c4Spdz0 z6c4From                    z0 z6c4Where            z0";call MGC
  19. tr "cc==== ==================== ====== === ======================== ================="
  20. do ii=1 to totpit;i=subword(it.0,ii,1);if index(' 'it.0' ',i)=0 then iterate ii
  21.   if v6=1&ii=loS+1 then do;ii=hiS-1;iterate ii;end;port=i;st=' ';gu 1101630+i;a=d2c(result);call MGC
  22.   mu=BitTST(a,1);if mu=1 then st='m';hi=BitTST(a,0);if hi=1&myport~=i then st='h'
  23.   getportid i;id=result;getwhere i;where=left(result,17);gu pd+(i*4);zy=c2d(import(offset(null(),result+30),2))
  24.   call MINUTES(zy);iT=zz;if where='(offline)' then iterate ii;if id=-1&(idle=1|v4=1 )then iterate ii
  25.   off=1630+myport;gu pd+(i*4);hidden=result+off;hide=BitTST(import(offset(null(),hidden),1),0)
  26.   muff=BitTST(import(offset(null(),hidden),1),1);gu 1200032;a=result
  27.   if hide=1&conf~=1 then do;a=a+fake;id=-1;call MINUTES(a);iT=zz;end
  28.   call MGC;if hide=1&conf~=1&v5=1 then iterate ii
  29.   if id>-1 then do;loadscratch id;savescratch (-id);gs 1101333;con=BitTST(d2c(result,4),7)
  30.   if con=1&myport~=i then st='+';if muff=1&con=0&st~='h' then st='M'
  31.   if hide=1&con=0 then st='H';if v1=1&zy>5 then where='c9Idle ce'iT
  32.   gs 1;handle=result;gs 1201214;cps=result%10;gs 4;city=result;gs 56;country=result
  33.   gs 57;logon=right(result,6);gs 38;who=result;call MGC;end
  34.   else do;handle=l903;where=l107;cps=0;city='';country='';logon=''
  35.   who='';time=0;if v1=1&where=l107 then where='c9Idle cb'iT
  36.   a='';if v2=1 then a=getclip('IdleWhoB'i);if a='' then a=getclip('IdleWhoBD');call MGC;end
  37.   if id>-1|a='' then do;se 'cf'right(port,2)' cb'st' ce'handle'.26}cd'right(logon,6)
  38.   tr ' cb'right(cps,3)' c6'left(city,21)left(country,3)' c9'where;call MGC;end
  39.   if id=-1&a~='' then do;tr 'cf'right(port,2)' cb'st' 'a'.62}c9'where;call MGC;end
  40.   if who~='' then tr copies(' ',37)'@8c9'who;call MGC
  41. end ii;tr 'cc===============================================================================';if help=3 then exit
  42. if help=2 then do;se '              cbm cf= cbMuffledcf, cbh cf= cbHiddencf, '
  43. tr 'cb+ cf= cbConference Control';exit;end;a="   cbm cc= cdYou're Muffling this Port.        "
  44. if conf=1 then a=a"cbM cc= caThey're trying to Muffle You.";tr a;a="   cbh cc= caYou're Hiding from this Port.     "
  45. if conf=1 then a=a"cbH cc= cdThey're trying to Hide from You.";tr a;tr "   cb+ cc= c9User has Conference Control.";exit
  46. MGC:;mg;if result='NOCHAR' then return;else do;tr l1066;exit;end
  47. ARGS:;gu 1202244;total=result-1;args='';do i=0 to total+1;gu 1302307+(i*61);args=args||result' ';end i;return
  48. PARSER:;arg rng,min,max;it.='';c=0;it=translate(rng,'  ','.,');do a=1 to words(it);c=c+1;it.c=word(it,a)
  49.   if index(it.c,'-')>0 then do;parse var it.c x'-'y;if y='' then y=max;if x='' then x=min;if x>y then do;d=x;x=y;y=d;end
  50.   if x<min|y>max|~datatype(x,'W')|~datatype(y,'W') then do;c=c-1;iterate;end;do b=x to y;it.c=b;c=c+1;end;c=c-1;end
  51.   else if it.c<min|it.c>max|~datatype(it.c,'W') then do;c=c-1;iterate;end;end;totpit=c;do i=1 to c;it.0=it.0||it.i' ';end;return
  52. MINUTES:;arg m;t=right(m,1);m=m%10;hrs=m%60;mins=m-(hrs*60);if hrs=0 then zz=mins'.'t' caMinutes';else zz=hrs'.'mins%6' cdHours';return
  53. CONFIG:;call open(f1,dp'config.data','r');a=readln(f1);call close(f1);parse var a l107''l903''l1066''fake''junk;return
  54. SYNTAX:;ERROR:;IOERR:;e1=' Error: 'rc' ('errortext(rc)')';e2='  Line: 'left(sigl,4)'File:';gu 1311992;a=result
  55.   gu 1311960;b=result;c='"'a||b'"';e2=e2' 'c;tr e1;tr e2;logentry e1;logentry e2;e=sourceline(sigl)
  56.   do while e~='';e3='Source: 'left(e,37);tr e3;logentry e3;e=substr(e,38);end;bufferflush;exit
  57. /** Last Edited: 8-May-96 *************************************************\
  58. \****************************************** Frontiers BBS (716)/823-9892 **/
  59.